<?php

/*
 *  Copyright (C) 2012 etpass
 * 
 *  author:chl <chenhl, chenhl@etpass.com>
 *  date:2012-8-3
 *  encoding:UTF-8
 *  filename:BaseAction.class.php
 *  link:http://www.etpass.com
 */

/**
 * Description of BaseAction
 *
 * @author etpasse
 * 
 * @category action
 * @package action
 * @subpackage common
 * 
 */
class ControllerApp extends Etpass_common {

    protected static $tpl = null;

    public function __construct($themes = '') {
        parent::__construct();
        !$themes && $themes = APP_NAME;
        if ($this->tpl === NULL)
            $this->tpl = new SmartyCap(ROOT_PATH, $themes);
        

        if ($_SERVER['SERVER_PORT'] == '443') {
            $this->tpl->assign("http_file_url", FILE_SECUREURL);
        } else {
            //把css,js,图片的http路径写入模板
            $this->tpl->assign("http_file_url", HTTPFILEURL);
        }        
        $this->tpl->assign("httpurl", HTTPURL);
        $this->tpl->assign("app_httpurl", APP_HTTPURL);
        
    }

}

?>
